local botu = fk.CreateSkill {
  name = "lvshi__botu",
  tags = {"Round"},
}

Fk:loadTranslationTable{
  ["lvshi__botu"] = "博图",
  [":lvshi__botu"] = "轮次技，一名角色的回合结束后，若中央区内的牌花色数为4，则你可进行一个额外的回合。",
  ["$lvshi__botu"] = "书读五车，云开见日。",
}

local DIY = require "packages/diy_utility/diy_utility"
local ls = require "packages/lvshi/utility"

botu:addAcquireEffect(function (self, player, is_start)
  player.room:addSkill("#CenterArea")
end)

botu:addEffect(fk.TurnEnd, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(botu.name) and ls.countSuits(DIY.getCenterCards(player.room)) >= 4
    and player:usedSkillTimes(botu.name, Player.HistoryRound) == 0
  end,
  on_use = function(self, event, target, player, data)
    player:gainAnExtraTurn(true)
  end,
})

return botu
